<template>
    <div class="workflow-component">
        <div class="component-label" v-if="label">
            {{ label }}
            <span class="required" v-if="required">*</span>
        </div>
        <slot></slot>
        <div class="component-help" v-if="help">{{ help }}</div>
    </div>
</template>

<script lang="ts" setup>
defineProps<{
    label?: string;
    required?: boolean;
    help?: string;
}>();
</script>

<style lang="scss" scoped>
.workflow-component {
    margin-bottom: 20px;

    .component-label {
        font-size: 14px;
        color: #606266;
        margin-bottom: 8px;

        .required {
            color: #f56c6c;
            margin-left: 4px;
        }
    }

    .component-help {
        font-size: 12px;
        color: #909399;
        margin-top: 4px;
    }
}
</style> 